%%%-------------------------------------------------------------------
%%% @author patton.zhu
%%% @copyright (C) 2022, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 11. 5月 2022 19:03
%%%-------------------------------------------------------------------
-module(test).
-author("patton.zhu").

%% API
-export([area/1,test/0]). %导出声明，声明可以外部使用的函数
area({rectangle, Width, Height}) -> Width*Height; %子句
area({square, Side}) -> Side * Side.
test() ->
  12 = area({rectangle, 3, 4}),
  144 = area({square, 13}),
  tests_worked.